/* 
 * Author: anand
 * 
 */


#ifndef _PLAYLIST_ITEMS_H
#define	_PLAYLIST_ITEMS_H
#include<vector>
#include "playlist_item.h"
#include "dbhelper.h"
#include<string>
#include<algorithm>
class playlist_items {
public:
    playlist_items(int playlistid);
    virtual ~playlist_items();
    int size(){return _items->size();}
    playlist_item * at(int i){return &_items->at(i);}
	void show_playlist_items();
	void add_playlist_item(playlist_item * item);
private:
    playlist_items(const playlist_items& orig);
    std::vector<playlist_item> *_items;
    dbhelper *_dbhelper;
    int _playlistid;
	void update_relation(playlist_item *item, bool save);
	void sort_playlist();
};

#endif	/* _PLAYLIST_ITEMS_H */

